<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>vue练习2</title>
    <script src="../../js/vue.js"></script>
    <style>
      * {
        margin: 0;
        padding: 0;
      }
      div {
        border: 1px solid gray;
        width: 15%;
        margin: 3em auto;
      }
      p:first-child {
        text-align: center;
        background-color: dodgerblue;
        color: white;
      }
      p {
        margin-bottom: 0.5em;
      }
    </style>
  </head>
  <body>
    <div id="app">
      <p>{{title}}</p>
      <p>{{name}}</p>
      <p>{{sex}}</p>
      <p>{{age}}</p>
      <p>{{where}}</p>
      <p>{{star}}</p>
      <p>{{kg}}</p>
      <p>{{height}}</p>
      <p>{{blood}}</p>
      <p>{{work}}</p>
    </div>
    <script>
      var vapp = new Vue({
        el: "#app",
        data: {
          title: "个人信息",
          name: "姓名: 张三",
          sex: "性别: 男",
          age: "年龄: 21岁",
          where: "地址: 北京·昌平",
          star: "星座: 狮子座",
          kg: "体重: 69kg",
          height: "身高: 170cm",
          blood: "血型: A型",
          work: "工作: 前端工程师",
        },
      });
    </script>
  </body>
</html>
